package com.linsen.uaa.provider.dto;

import com.linsen.core.common.enums.LoginEndpointType;
import com.linsen.uaa.provider.enums.LoginAccountType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 登录-数据传输对象
 *
 * @author zhaoyong
 * @date 2023/3/16
 */
@Data
@ApiModel("登录-数据传输对象")
public class LoginDTO implements Serializable {
    @NotNull
    @ApiModelProperty("登录方式")
    private LoginAccountType loginAccountType;

    @NotBlank
    @ApiModelProperty("用户名/手机号")
    private String username;

    @NotBlank
    @ApiModelProperty("密码/短信验证码")
    private String password;

    @Valid
    @ApiModelProperty("图形验证码")
    private ImgCaptchaDTO captcha;

    @NotNull
    @ApiModelProperty("登录客户端类型")
    private LoginEndpointType loginEndpointType;
}
